package com.pda.gongpin.adapter;

import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;

import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.pda.gongpin.R;
import com.pda.gongpin.bean.HandingOutDetailBean;
import com.wangshen.base.ui.mvp.base.adapter.BaseAdapter;

import java.util.List;

public class HandingOutDetailAdapter extends BaseAdapter<HandingOutDetailBean> {
    public HandingOutDetailAdapter(int layoutResId, @Nullable List<HandingOutDetailBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, HandingOutDetailBean item) {
        super.convert(helper, item);
        helper.setText(R.id.tv_sku,item.getShipmentsNumber().getSku());
        helper.setText(R.id.tv_articleId,"物资编号："+item.getShipmentsNumber().getArticleId());
        helper.setText(R.id.tv_articleName,"物资名称："+item.getShipmentsNumber().getArticleName());
        helper.setText(R.id.tv_inNum,"应出库："+item.getShipmentsNumber().getStackNum()+"");
        helper.setText(R.id.tv_spec,"规格："+item.getShipmentsNumber().getArticleSpec()+"");
        FullTrayOutDetailListAdapter adapter=new FullTrayOutDetailListAdapter(R.layout.item_detail_list,item.getList());
        RecyclerView recyclerView=helper.getView(R.id.rv_list);
        recyclerView.setAdapter(adapter);
    }
}
